using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;

namespace Dogfight2008.Common.Tests
{
  [TestFixture]
  public class QFixture
  {
    [Test]
    public void Lines1()
    {
      string input = "";
      string[] expected = new string[] { "" };
      CollectionAssert.AreEqual(expected, Q.Lines(input));
    }

    [Test]
    public void Lines2()
    {
      string input = " ";
      string[] expected = new string[] { " " };
      CollectionAssert.AreEqual(expected, Q.Lines(input));
    }

    [Test]
    public void Lines3()
    {
      string input = "a\nb";
      string[] expected = new string[] { "a", "b" };
      CollectionAssert.AreEqual(expected, Q.Lines(input));
    }

    [Test]
    public void Lines4()
    {
      string input = "a\r\nb\r\n";
      string[] expected = new string[] { "a", "b", "" };
      CollectionAssert.AreEqual(expected, Q.Lines(input));
    }

    [Test]
    public void Lines5()
    {
      string input = "a\n\nb\r\ndef\r";
      string[] expected = new string[] { "a", "", "b", "def\r" };
      CollectionAssert.AreEqual(expected, Q.Lines(input));
    }
  }
}
